package lab02.Test06;

//	Ladder类具有类型double的上底、下底、高、面积属性，具有返回面积的功能。
public class Ladder {
    double above;
    double down;
    double high;
    double area;

    public void setValue(double above, double down, double high) {
        this.high = high;
        this.down = down;
        this.above = above;
    }

    public void area(double above, double down, double high) {
        area = ((above + down) * high) / 2;
        System.out.println("梯形面积是：" + area);
    }
}

